#ifndef ROBOT_H
#define ROBOT_H

#include <iostream>
#include "RobotClient.h"
#include "../common.h"


//class Pose
//{
//public:
//	double x, y, z;
//	double rx, ry, rz;
// //   Pose operator*(Pose,Pose);
//};

//typedef struct _Move
//{
//	Pose p;
//	int moveType;
//	int speed;
//} Move;

class Robot
{
public:
    explicit Robot(bool isContinousAcq = true, CObject *parent = 0);
    ~Robot();
    int setPose(Move m);
    int switchHand(int s);
    int switchGripper(int s);
    int switchVavle2(int s);
    int switchPlc(int s);
    int switchMotor(int s);
    Pose getPose();

	int switchcylinder1(int s);
	int switchcylinder2(int s);
	int switchcylinder3(int s);
	int switchcylinder4(int s);
	int switchcylinder5(int s);
	int switchcylinder6(int s);

private:
    Pose currPose;
/*  QTimer *tmr;
signals:
    void currPoseReady(Pose p);
    void isRobotMoving(bool s);
    void log(QString msg);       */

public :
    //通知机器人进行运动
    void onMoveRobot(Move m);
    //通知机器人切换手抓状态
    void onSwitchHand(int s);
    //通知机器人切换滑台夹具状态
    void onSwitchGripper(int s);
    //通知机器人切换连杆夹具状态
    void onSwitchVavle2(int s);
    //通知PLC开关
    void onSwitchPlc(int s);
    //通知电机
    void onSwitchMotor(int s);

	void onswitchcylinder1(int s);
	void onswitchcylinder2(int s);
	void onswitchcylinder3(int s);
	void onswitchcylinder4(int s);
	void onswitchcylinder5(int s);
	void onswitchcylinder6(int s);

private :
    void onTimer();

};

#endif // ROBOT_H
